﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QuickGame.Model
{
    public class ChiTietChoiHs
    {
        public static IQueryable<ChiTietChoi> QueryEntities(ModelContext modelContext)
        {
            return modelContext.ChiTietChois;
        }

        public static ChiTietChoi QueryEntity(ModelContext modelContext, long id)
        {
            return modelContext.ChiTietChois.Single(k => k.ID == id);
        }

        public static ChiTietChoi Insert(ModelContext modelContext)
        {
            ChiTietChoi lc = new ChiTietChoi();
            modelContext.ChiTietChois.AddObject(lc);
            return lc;
        }
        public static void Delete(ModelContext modelContext, long id)
        {
            ChiTietChoi nd = modelContext.ChiTietChois.Single(k => k.ID == id);
            modelContext.ChiTietChois.DeleteObject(nd);
        }
    }
}